define(["jquery","layuiall","jqform","baidueditor"],function ($,layui,jqform,UE) {
    var form = layui.form;
    controller = {
        index:function () {
            jqform.delete()

            //数据全部选中
            form.on('checkbox(select-all)', function(data){

                if(data.elem.checked==true){
                    $("input[name='idList[]']").prop('checked',true)
                }else {
                    $("input[name='idList[]']").prop('checked',false)
                }
                form.render('checkbox');
            });
        },
        addversion:function () {
            var ue =UE.getEditor('container');
            jqform.init()
        },
        editversion:function () {
            var ue = UE.getEditor('container');
            jqform.init()
        }
    }
    return controller;
})